package com.google.code.qsecurity.server.locator;

import com.google.code.qsecurity.server.domain.EmailVerification;
import com.google.web.bindery.requestfactory.shared.Locator;


public class EmailVerificationLocator extends Locator<EmailVerification, String> {

	@Override
	public EmailVerification create(Class<? extends EmailVerification> clazz) {
		return new EmailVerification();
	}

	@Override
	public EmailVerification find(Class<? extends EmailVerification> clazz, String id) {
		// TODO fix
		return create(clazz);
	}

	@Override
	public Class<EmailVerification> getDomainType() {
		return EmailVerification.class;
	}

	@Override
	public String getId(EmailVerification domainObject) {
		return domainObject.getEmail();
	}

	@Override
	public Class<String> getIdType() {
		return String.class;
	}

	@Override
	public Object getVersion(EmailVerification domainObject) {
		return domainObject.getVersion();
	}

}
